# 将给定的字符串用','分割, 分割后的元素存到列表中,','不要了
# 2021-8-4
# by: Nasa

def fg(zfc, b=','):
    # 将给定的字符串分割
    lb = []
    a = ''
    for i in zfc:
        if i == b:
            lb.append(a)
            a = ''
        else:
            a = a + i
    lb.append(a)
    return lb


def zhwe(str):
    '''
    将'NAME ?37073? ?26519? ?37073? ?38055? ?22825? '
    ?中间的unicode变为汉字
    '''
    hzs = ''
    lb = fg(str, ' ')
    for i in lb:
        if len(i) == 7 and i[0] == '?' and i[-1] == '?':
            wstr = list(i)
            wstr.remove('?')
            wstr.remove('?')
            wwstr = ''
            for j in wstr:
                wwstr += j
            if wwstr.isdigit():
                wwstr = int(wwstr)
                hz = chr(wwstr)
                hzs += hz
        else:
            hzs += i +' '
    return hzs


if __name__ == '__main__':
    n = 'NAME ?37073? ?26519? ?37073? ?38055? ?22825? '
    # print(fg(n, ' '))
    print(zhwe(n))
